<template>
	<view class="collect">
		<view class="collect_bos">
			<!-- 循环 -->
<!-- 			<LoadMore ref="LoadMore" id="LoadMore" :diffHeight="0" :initData="initData" @dataRefresh='dataRefresh'> -->
				<view class="collect_list" v-for="(item,index) in list" :key="index" @click="Oninquiry(item)">
					<image :src="item.doctor_info.img"></image>
					<view class="collect_box">
						<view class="collect_name font15 font-323232 font-b">{{item.doctor_info.name}}</view>
						<view class="collect_title font14 ellipsis font-646464">{{item.doctor_info.title}}</view>
						<view class="collect_info ellipsis font13 font-989898">{{item.doctor_info.synopsis}}</view>
					</view>
				</view>
			<!-- </LoadMore> -->
		</view>
	</view>
</template>

<script>
	// import LoadMore from "@/components/loadMore.vue";
	export default {
		components: {
			// LoadMore
		},
		data() {
			return {
				list: [{}],
				//传参数据
				initData: {
					url: 'follow_list', //接口
					//data里得传参
					param: {},
				},
			}
		},
		onLoad: function(options) {
		this.Onfollow()
		},
		methods: {
			Onfollow(){
				this.$Http({
					url: 'listUserDoctor',
					data: {}
				}).then(res => {
					res.data.forEach(item=>{
						item.doctor_info.img = this.$store.state.http_img + item.doctor_info.img
					})
					this.list = res.data
				})
			},
			//返回数据
			dataRefresh(e) {
				console.log(e,'ppppppppp')
				// this.list = e
			},
			//详情页面
			Oninquiry(e) {
				uni.navigateTo({
					url: '/pagesA/ask/inquiry?id='+e.doctor_id,
				})
			}
		}
	}
</script>

<style>
	.collect {
		height: 100%;
		background-color: #f9f9f9;
	}

	.collect_list {
		width: 690rpx;
		padding: 30rpx;
		margin: 30rpx;
		border-bottom: 1rpx #eeeeee solid;
		background: #ffffff;
		display: flex;
		align-items: center;
	}

	.collect_list image {
		width: 120rpx;
		height: 140rpx;
		border-radius: 10rpx;
	}

	.collect_box {
		width: 510rpx;
		height: 140rpx;
		padding-left: 30rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}
</style>
